Skip to content

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#21

Merged
tkoehlerlg merged 1 commit into
mainfrom
bugfix/workflow-permissions
Nov 20, 2025
Merged

Potential fix for code scanning alert no. 3: Workflow does not contain permissions#21
tkoehlerlg merged 1 commit into
mainfrom
bugfix/workflow-permissions

Conversation

@tkoehlerlg

Copy link
Copy Markdown
Contributor

Potential fix for https://github.com/recal-dev/scheduling-sdk/security/code-scanning/3

To address the flagged issue, we should set the permissions key in the workflow to limit the actions jobs' GITHUB_TOKEN privileges to the minimum necessary. In this workflow, the actions (actions/checkout, reading package version, running npm view, etc.) only require reading repository contents – no write operations are performed.
Steps:

  • Add a permissions block at the root of .github/workflows/version-check.yml (just below the name: line, before on:).
  • Set the minimal permission required: contents: read.
  • No additional imports or code changes are necessary, as this is a workflow-level policy declaration.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@tkoehlerlg
tkoehlerlg marked this pull request as ready for review November 20, 2025 21:47
@codecov

codecov Bot commented Nov 20, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tkoehlerlg
tkoehlerlg merged commit 6dc6550 into main Nov 20, 2025
6 checks passed
@tkoehlerlg
tkoehlerlg deleted the bugfix/workflow-permissions branch November 20, 2025 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant